/**
 * @ClassName LC1304
 * @Author ykx
 * @Date 2024/3/25 13:57
 * @Version 1.0
 */
public class LC1304 {
    public int[] sumZero(int n) {
        int k = n / 2;
        int[] nums = new int[n];
        for (int i = 0; i < (n % 2 == 0 ? n : n - 1); i++) {
            nums[i] = (int) Math.pow(-1, i) * (i / 2 + 1);
        }
        return nums;
    }
}
